﻿@{
    ViewBag.Title = "ControlPanel";
    var controller = this.ViewContext.Controller as EagleProject.Controllers.MyController;
}

<h2>Control Panel</h2>

<style type="text/css">
    #cp a {
        text-decoration: underline !important;
    }
</style>

<div id="cp">
    @if (controller.IsAdmin())
    {
        <fieldset>
            <legend>Admin Modules</legend>
            <ol>
                <li>@Html.ActionLink("List User", "ListUser", "Admin")</li>
                <li>@Html.ActionLink("Create Consultant", "CreateConsultant", "Admin")</li>
                <li>@Html.ActionLink("List Partner", "ListPartner", "Admin")</li>
                <li>@Html.ActionLink("Create Human Resource(HR)", "CreateHumanResource", "Admin")</li>
                <li>@Html.ActionLink("List Subscriber", "ListSubscriber", "Admin")</li>
            </ol>
        </fieldset>
    }

    @if (controller.IsHumanResource())
    {    
        <fieldset>
            <legend>Human Resource Modules</legend>
            <ol>
                <li>@Html.ActionLink("List Application", "ListApplication", "HumanResource")</li>
                <li>@Html.ActionLink("List Consultant", "ListConsultant", "HumanResource")</li>
                <li>@Html.ActionLink("List Agent", "ListAgent", "HumanResource")</li>
            </ol>
        </fieldset>
    }

    @if (controller.IsOfficer())
    {   
        <fieldset>
            <legend>Officer Modules</legend>
            <ol>
                <li>@Html.ActionLink("List Event", "ListEvent", "Officer")</li>
                <li>@Html.ActionLink("List Accident Record", "ListAccidentRecord", "Officer")</li>
            </ol>
        </fieldset>
    }

    @if (controller.IsPartner())
    {    
        <fieldset>
            <legend>Partner Modules</legend>
            <ol>
                <li>@Html.ActionLink("List Subscriber", "ListSubscriber", "Partner")</li>
                <li>@Html.ActionLink("Request Subscriber Details", "RequestFullSubscriberData", "Partner")</li>
            </ol>
        </fieldset>
    }


    @if (controller.IsConsultant())
    {    
        <fieldset>
            <legend>Consultant Modules</legend>
            <ol>
                <li>@Html.ActionLink("Create Agent", "CreateAgent", "Consultant")</li>
            </ol>
        </fieldset>
    }

    @if (controller.IsAgent())
    {    
        <fieldset>
            <legend>Agent Modules</legend>
            <ol>
                <li>@Html.ActionLink("List Subscriber", "ListSubscriber", "Agent")</li>
            </ol>
        </fieldset>
    }
    @if (controller.IsSubscriber())
    {
        <fieldset>
            <legend>Subscriber Modules</legend>
            <ol>
                <li>@Html.ActionLink("List My Register Form", "ListRegForm", "Subscriber")</li>
            </ol>
        </fieldset>
    }
</div>
